﻿
<%@ Page Language="C#" Theme="PAT_Theme" MasterPageFile="~/master/PAT.master" AutoEventWireup="true"  CodeFile="PatVehiculo.aspx.cs" Inherits="PatVehiculo" Title="PatVehiculo List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="subHeaderContent" Runat="Server">Pat Vehiculo List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="PatVehiculoDataSource"
				DataKeyNames="IdVehiculo"
				AllowMultiColumnSorting="false"
				DefaultSortColumnName="" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_PatVehiculo.xls"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />				
				<asp:BoundField DataField="Vin" HeaderText="Vin" SortExpression="[VIN]"  />
				<asp:BoundField DataField="Placa" HeaderText="Placa" SortExpression="[PLACA]"  />
				<asp:BoundField DataField="Motor" HeaderText="Motor" SortExpression="[MOTOR]"  />
				<asp:BoundField DataField="IdCliente" HeaderText="Id Cliente" SortExpression="[ID_CLIENTE]"  />
				<asp:BoundField DataField="Serie" HeaderText="Serie" SortExpression="[SERIE]"  />
				<asp:BoundField DataField="Chasis" HeaderText="Chasis" SortExpression="[CHASIS]"  />
				<data:HyperLinkField HeaderText="Id Color" DataNavigateUrlFormatString="PatColorEdit.aspx?IdColor={0}" DataNavigateUrlFields="IdColor" DataContainer="IdColorSource" DataTextField="DescripcionColor" />
				<asp:BoundField DataField="AnioModelo" HeaderText="Anio Modelo" SortExpression="[ANIO_MODELO]"  />
				<data:HyperLinkField HeaderText="Id Tipo Servicio" DataNavigateUrlFormatString="PatTipoServicioEdit.aspx?IdTipoServicio={0}" DataNavigateUrlFields="IdTipoServicio" DataContainer="IdTipoServicioSource" DataTextField="DescripcionTipoServicio" />
				<asp:BoundField DataField="FechaVencimientoSeguroObligatorio" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Fecha Vencimiento Seguro Obligatorio" SortExpression="[FECHA_VENCIMIENTO_SEGURO_OBLIGATORIO]"  />
				<asp:BoundField DataField="NombreConcesionarioVendedor" HeaderText="Nombre Concesionario Vendedor" SortExpression="[NOMBRE_CONCESIONARIO_VENDEDOR]"  />
				<asp:BoundField DataField="FechaVenta" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Fecha Venta" SortExpression="[FECHA_VENTA]"  />
				<asp:BoundField DataField="KilometrajeVenta" HeaderText="Kilometraje Venta" SortExpression="[KILOMETRAJE_VENTA]"  />
				<asp:BoundField DataField="NumeroRadio" HeaderText="Numero Radio" SortExpression="[NUMERO_RADIO]"  />
				<asp:BoundField DataField="UltimoKilometraje" HeaderText="Ultimo Kilometraje" SortExpression="[ULTIMO_KILOMETRAJE]"  />
				<asp:BoundField DataField="KilometrajePromedio" HeaderText="Kilometraje Promedio" SortExpression="[KILOMETRAJE_PROMEDIO]"  />
				<data:BoundRadioButtonField DataField="Activo" HeaderText="Activo" SortExpression="[ACTIVO]"  />
				<data:HyperLinkField HeaderText="Id Catalogo" DataNavigateUrlFormatString="PatCatalogoVehiculoEdit.aspx?IdCatalogo={0}" DataNavigateUrlFields="IdCatalogo" DataContainer="IdCatalogoSource" DataTextField="CodigoInternoCatalogo" />
			</Columns>
			<EmptyDataTemplate>
				<b>No PatVehiculo Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnPatVehiculo" OnClientClick="javascript:location.href='PatVehiculoEdit.aspx'; return false;" Text="Agregar Nuevo "></asp:Button>
		<data:PatVehiculoDataSource ID="PatVehiculoDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:PatVehiculoProperty Name="PatCatalogoVehiculo"/> 
					<data:PatVehiculoProperty Name="PatColor"/> 
					<data:PatVehiculoProperty Name="PatTipoServicio"/> 
					<%--<data:PatVehiculoProperty Name="PatOrdenTrabajoCollection" />--%>
				</Types>
			</DeepLoadProperties>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:PatVehiculoDataSource>
	    		
</asp:Content>



